package 代码记录.校招笔试真题.笔试真题_2022.ONES;

import java.util.Scanner;

public class 小红的数列 {
    /**
     * 100%
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long count = 1;//前一个数
        long one = 0;//奇数项数值
        long two = 0;//偶数项数值
        for(int i = 2;i <= n;i++){
            if(i % 2 == 0){//偶数项
                two = (count + 1) % 1000000007;
                count = two;
            }else{//奇数项
                one = (2 * count) % 1000000007;
                count = one;
            }
        }
        System.out.println(count % 1000000007);
    }
}
